-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(baseapp): audit changes #16596
fix(baseapp): audit changes #16596
Conversation
if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { | ||
|
||
extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 | ||
if !extsEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return error during ExtendVote and VerifyVoteExtension if the request height is earlier than VoteExtensionsEnableHeight
.
Also if VoteExtensionsEnableHeight == 0
then vote extensions are not enabled (see the default value here)
@@ -571,6 +573,7 @@ func (app *BaseApp) ExtendVote(_ context.Context, req *abci.RequestExtendVote) ( | |||
WithHeaderInfo(coreheader.Info{ | |||
ChainID: app.chainID, | |||
Height: req.Height, | |||
Hash: req.Hash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this given that it might be needed
The header hash of the proposed block that the vote extension is to refer to.
if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { | ||
|
||
extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 | ||
if !extsEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See lines 561-ish
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> (cherry picked from commit b93081d) # Conflicts: # CHANGELOG.md
audit issue: #16474
Changes
VoteExtensionsEnableHeight
(see comments in this pr).Related PRs: #16713
TODO: figure out what to do when ABCI is not set in consensus params. I suppose we default to "not enable vote extensions"Vote extensions are disabled by default ifconsensusParams.Abci == nil
or ifVoteExtensionsEnableHeight == 0
.SetStreamingService was removed at #14207 should it get added to changelog?
Double check test:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change